<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible"content="IE=8"><!--以IE8模式渲染-->
	<meta http-equiv="X-UA-Compatible"content="IE=7"><!--以IE7模式渲染-->
	<meta http-equiv="X-UA-Compatible"content="IE=9; IE=8; IE=7; IE=EDGE">
	<title>员工新增</title>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/demo.css">
	<script type="text/javascript" src="__PUBLIC__/easyui/jquery.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/easyui/jquery.easyui.min.js"></script>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/js/jquery.alert.v1.2/jquery.alert.css"/>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/js/jquery_validate/css/validationEngine.jquery.css" >
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/form_table.css">
	<script type="text/javascript" src="__PUBLIC__/js/jquery_validate/js/jquery.validationEngine.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/jquery_validate/js/jquery.validationEngine-zh_CN.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/jquery.alert.v1.2/jquery.alert.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/customer/customer_edit.js"></script>
</head>

<body>
	<div class="easyui-tabs" data-options="tabWidth:245" id="tt">
		<div title="基本信息">
            <div style="width:98%" class="form-panel">
                <div  id="form-link">
                    <div class="easyui-panel" style="padding:5px;border-width: 0px;border-bottom-width: 1px;">
                        <a href="javscript:;" class="easyui-linkbutton" onclick="add_ajax_submit();" iconCls="icon-save" plain="true" style="width:80px">保存</a>
                        <a href="javscript:;" class="easyui-linkbutton" onclick="reset();" iconCls="icon-reload" plain="true" style="width:80px">重置</a>
                        <a href="javscript:;" class="easyui-linkbutton" onclick="close_tab();" iconCls="icon-undo" plain="true" style="width:80px">关闭</a>
                    </div>
                </div>
                <div class="table_main">
                <form action="../../customer/customer/customer_update_base" id="defaultForm" method="post">
                    <input type="hidden" name="base" value="<?php echo $data_array['cust_id']; ?>">
                    <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
                        <tr>
                            <th width="131">名称</th>
                            <th>内容</th>
                        </tr>
                        <tr>
                            <td width="131">真实姓名：</td>
                            <td>
                                <input type="text" class="inpMain" name="cust_name" placeholder="请输入真实姓名" value="<?php echo $data_array['cust_name'] ?>" />
                            </td>
                        </tr>
                        <tr>
                            <td width="131">性别：</td>
                            <td>
                                <label for="site_closed_0">
                                    <input type="radio" name="site_closed" id="site_closed_0" value="0" checked="true">男
                                </label>
                                <label for="site_closed_1">
                                    <input type="radio" name="site_closed" id="site_closed_1" value="1">女
                                </label>
                            </td>
                        </tr>
                        <tr>
                            <td width="131">手机号码：</td>
                            <td>
                                <input type="text" name="cust_phone" id="cust_phone" placeholder="请输入手机" class="inpMain validate[required,custom[phone]]" value="<?php echo $data_array['cust_phone']?>" />
                            </td>
                        </tr>
                        <tr>
                            <td width="131">电子邮箱：</td>
                            <td>
                                <input type="text" class="inpMain validate[custom[email]]" name="cust_email" placeholder="请输入邮箱" value="<?php echo $data_array['cust_email']?>" />
                            </td>
                        </tr>
                        <tr>
                            <td width="131">身份证：</td>
                            <td>
                                <input type="text" class="inpMain" name="cust_identity" placeholder="请输入身份证" value="<?php echo $data_array['cust_identity']?>" />
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
    </div>
    <div title="详细信息">
    </div>
		<!--<div title="详细信息" style="padding:10px">
			<form action="../../customer/customer/customer_update_detail" method="post" id="form_id2" name ="custadd2">
				<input type="hidden" name="detail" value="<?php echo $data_array['cust_id']; ?>">
				&lt;!&ndash; <br/><HR width="100%" color=black /><br/> &ndash;&gt;
				<h1>详细信息</h1>
				<table class="addForm">
					<tr>
						<td class="content-n">婚姻状况：</td>
						<td class="content-d">
							<select class="form-control" name="marry_status_id">
								<option value="">请选择</option>
								<?php
									foreach ($data_marital as $key => $value) 
									{
										if ($value['m_id'] == $data_detail['marry_status_id']) 
										{
											echo "<option value=" . $value['m_id'] . " selected>" . $value['m_name'] . "</option>";
										}
										else
										{
											echo "<option value='".$value['m_id']."'>".$value['m_name']."</option>";
										}
									}
								?>
							</select>
						</td>
					</tr>
					<tr id="communication">
						<td class="content-n">通讯地址省，市，区：</td>
						<td>
							<select name='communication_province' class="prov"></select>
							<select name='communication_city' class="city"><option value="">请选择</option></select>
							<select name='communication_district' class="dist"><option value="">请选择</option></select>
						</td>
					</tr>
					<tr>
						<td class="content-n">通讯地址：</td>
						<td class="content-d content-sex">
							<input type="text" class="form-control" value="<?php echo $data_detail['communication_address']?>" name="communication_address" placeholder="请输入通讯地址" />
						</td>
					</tr>
					<tr>
						<td class="content-n">通讯地址邮编：</td>
						<td class="content-d">
							<input type="text" class="form-control" name="communication_postcode" placeholder="请输入邮编" value="<?php echo $data_detail['communication_postcode']?>"/>
						</td>
					</tr>
					<tr>
						<td class="content-n">最高学历：</td>
						<td class="content-d">
							<select class="form-control" name="education_status_id">
								<option value="">请选择</option>
								<?php
									foreach ($data_education as $key => $value) 
									{
										if ($value['edu_id'] == $data_detail['education_status_id']) 
										{
											echo "<option value=" . $value['edu_id'] . " selected>" . $value['edu_name'] . "</option>";
										}
										else
										{
											echo "<option value='".$value['edu_id']."'>".$value['edu_name']."</option>";
										}
									}
								?>
							</select>
						</td>
					</tr>
					<tr>
						<td class="content-n">最高学位：</td>
						<td class="content-d">
							<select class="form-control" name="degree_status_id">
								<option value="">请选择</option>
								<?php
									foreach ($data_degree as $key => $value) 
									{
										if ($value['deg_id'] == $data_detail['degree_status_id']) 
										{
											echo "<option value=" . $value['deg_id'] . " selected>" . $value['deg_name'] . "</option>";
										}
										else
										{
											echo "<option value='".$value['deg_id']."'>".$value['deg_name']."</option>";
										}
									}
								?>
							</select>
						</td>
					</tr>
					<tr id="live">
						<td class="content-n">居住地址省，市，区：</td>
						<td>
							<select name='live_province' class="prov"></select>
							<select name='live_city' class="city"><option value="">请选择</option></select>
							<select name='live_district' class="dist"><option value="">请选择</option></select>
						</td>
					</tr>
					<tr>
						<td class="content-n">居住地址：</td>
						<td class="content-d content-sex">
							<input type="text" class="form-control" value="<?php echo $data_detail['live_address']?>" name="live_address" placeholder="请输入居住地址" />
						</td>
					</tr>
					<tr>
						<td class="content-n">居住地址邮编：</td>
						<td class="content-d">
							<input type="text" class="form-control" name="live_postcode" placeholder="请输入邮编" value="<?php echo $data_detail['live_postcode']?>"/>
						</td>
					</tr>
					<tr>
						<td class="content-n">居住状况：</td>
						<td class="content-d">
							<select class="form-control" name="live_status">
								<option value="">请选择</option>
								<?php
									foreach ($data_livestatus as $key => $value) 
									{
										if ($value['li_id'] == $data_detail['live_status']) 
										{
											echo "<option value=" . $value['li_id'] . " selected>" . $value['li_value'] . "</option>";
										}
										else
										{
											echo "<option value='".$value['li_id']."'>".$value['li_value']."</option>";
										}
									}
								?>
							</select>
						</td>
					</tr>
					<tr>
						<td class="addButton" colspan="2">
							<input type="submit" class='save' value ="保存" >
							<input type='button' value='重置'  class='clear' onclick='window.location.reload();'>
						</td>
					</tr>
				</table>
			</form>
		</div>
		<div title="联系人信息" style="padding:10px">
			<form action="../../customer/customer/customer_update_links" method="post" id="form_id3" name ="custadd3">
				<input type="hidden" name="links" value="<?php echo $data_array['cust_id']; ?>">
				&lt;!&ndash; <br/><HR width="100%" color=black /><br/> &ndash;&gt;
				<h1>联系人信息</h1>
				<table class="addForm">
					<tr>
						<td class="content-n">联系人1：</td>
						<td class="content-d">
							<input type="text" class="form-control" name="first_linkman_name" placeholder="请输入联系人" value="<?php echo $data_links['first_linkman_name']?>"/>
						</td>
					</tr>
					<tr>
						<td class="content-n">关系1：</td>
						<td class="content-d">
							<select class="form-control" name="first_linkman_type">
								<option value="">请选择</option>
								<?php
									foreach ($data_relation as $key => $value) 
									{
										if ($value['r_id'] == $data_links['first_linkman_type']) 
										{
											echo "<option value=" . $value['r_id'] . " selected>" . $value['r_name'] . "</option>";
										}
										else
										{
											echo "<option value='".$value['r_id']."'>".$value['r_name']."</option>";
										}
									}
								?>
							</select>
						</td>
					</tr>
					<tr>
						<td class="content-n">联系人号码1：</td>
						<td class="content-d content-sex">
							<input type="text" class="form-control" value="<?php echo $data_links['first_linkman_phone']?>" name="first_linkman_phone" placeholder="请输入联系人号码" />
						</td>
					</tr>
					<tr id="linkman">
						<td class="content-n">联系人地址省，市，区：</td>
						<td>
							<select name='first_linkman_province' class="prov"></select>
							<select name='first_linkman_city' class="city"><option value="">请选择</option></select>
							<select name='first_linkman_district' class="dist"><option value="">请选择</option></select>
						</td>
					</tr>
					<tr>
						<td class="content-n">详细地址：</td>
						<td class="content-d content-sex">
							<input type="text" class="form-control" value="<?php echo $data_links['first_linkman_address']?>" name="first_linkman_address" placeholder="请输入通讯地址" />
						</td>
					</tr>
					<tr>
						<td class="content-n">联系人2：</td>
						<td class="content-d">
							<input type="text" class="form-control" name="second_linkman_name" placeholder="请输入联系人" value="<?php echo $data_links['second_linkman_name']?>"/>
						</td>
					</tr>
					<tr>
						<td class="content-n">关系2：</td>
						<td class="content-d">
							<select class="form-control" name="second_linkman_type">
								<option value="">请选择</option>
								<?php
									foreach ($data_relation as $key => $value) 
									{
										if ($value['r_id'] == $data_links['second_linkman_type']) 
										{
											echo "<option value=" . $value['r_id'] . " selected>" . $value['r_name'] . "</option>";
										}
										else
										{
											echo "<option value='".$value['r_id']."'>".$value['r_name']."</option>";
										}
									}
								?>
							</select>
						</td>
					</tr>
					<tr>
						<td class="content-n">联系人号码2：</td>
						<td class="content-d content-sex">
							<input type="text" class="form-control" value="<?php echo $data_links['second_linkman_phone']?>" name="second_linkman_phone" placeholder="请输入联系人号码" />
						</td>
					</tr>
					<tr>
						<td class="addButton" colspan="2">
							<input type="submit" class='save' value ="保存" >
							<input type='button' value='重置'  class='clear' onclick='window.location.reload();'>
						</td>
					</tr>
				</table>
			</form>
		</div>

		<div title="工作信息" style="padding:10px">
			<form action="../../customer/customer/customer_update_workinfo" method="post" id="form_id4" name ="custadd4">
				<input type="hidden" name="workinfo" value="<?php echo $data_array['cust_id']; ?>">
				&lt;!&ndash; <br/><HR width="100%" color=black /><br/> &ndash;&gt;
				<h1>工作信息</h1>
				<table class="addForm">
					<tr>
						<td class="content-n">身份类型：</td>
						<td class="content-d">
							<select class="form-control" name="current_status">
								<option value="">请选择</option>
								<?php
									foreach ($data_worktype as $key => $value) 
									{
										if ($value['cust_typeid'] == $data_workdetail['current_status']) 
										{
											echo "<option value=" . $value['cust_typeid'] . " selected>" . $value['cust_typename'] . "</option>";
										}
										else
										{
											echo "<option value='".$value['cust_typeid']."'>".$value['cust_typename']."</option>";
										}
									}
								?>
							</select>
						</td>
					</tr>
					<tr>
						<td class="content-n">行业：</td>
						<td class="content-d">
							<select class="form-control" name="company_industry">
								<option value="">请选择</option>
								<?php
									foreach ($data_profession as $key => $value) 
									{
										if ($value['id'] == $data_workdetail['company_industry']) 
										{
											echo "<option value=" . $value['id'] . " selected>" . $value['name'] . "</option>";
										}
										else
										{
											echo "<option value='".$value['id']."'>".$value['name']."</option>";
										}
									}
								?>
							</select>
						</td>
					</tr>
					<tr>
						<td class="content-n">职业：</td>
						<td class="content-d">
							<select class="form-control" name="profession_status_id">
								<option value="">请选择</option>
								<?php
									foreach ($data_position as $key => $value) 
									{
										if ($value['pos_id'] == $data_workdetail['profession_status_id']) 
										{
											echo "<option value=" . $value['pos_id'] . " selected>" . $value['pos_name'] . "</option>";
										}
										else
										{
											echo "<option value='".$value['pos_id']."'>".$value['pos_name']."</option>";
										}
									}
								?>
							</select>
						</td>
					</tr>
					<tr>
						<td class="content-n">职务：</td>
						<td class="content-d">
							<select class="form-control" name="duty_status">
								<option value="">请选择</option>
								<?php
									foreach ($data_duty as $key => $value) 
									{
										if ($value['du_id'] == $data_workdetail['duty_status']) 
										{
											echo "<option value=" . $value['du_id'] . " selected>" . $value['du_name'] . "</option>";
										}
										else
										{
											echo "<option value='".$value['du_id']."'>".$value['du_name']."</option>";
										}
									}
								?>
							</select>
						</td>
					</tr>
					<tr>
						<td class="content-n">职称：</td>
						<td class="content-d">
							<select class="form-control" name="title_status">
								<option value="">请选择</option>
								<?php
									foreach ($data_title as $key => $value) 
									{
										if ($value['ti_id'] == $data_workdetail['title_status']) 
										{
											echo "<option value=" . $value['ti_id'] . " selected>" . $value['ti_name'] . "</option>";
										}
										else
										{
											echo "<option value='".$value['ti_id']."'>".$value['ti_name']."</option>";
										}
									}
								?>
							</select>
						</td>
					</tr>
					<tr>
						<td class="content-n">单位名称：</td>
						<td class="content-d content-sex">
							<input type="text" class="form-control" value="<?php echo $data_workdetail['company_name']?>" name="company_name" placeholder="请输入单位名称" />
						</td>
					</tr>
					<tr id="company">
						<td class="content-n">单位地址省，市，区：</td>
						<td>
							<select name='company_province' class="prov"></select>
							<select name='company_city' class="city"><option value="">请选择</option></select>
							<select name='company_district' class="dist"><option value="">请选择</option></select>
						</td>
					</tr>
					<tr>
						<td class="content-n">单位详细地址：</td>
						<td class="content-d content-sex">
							<input type="text" class="form-control" value="<?php echo $data_workdetail['company_address']?>" name="company_address" placeholder="请输入单位详细地址" />
						</td>
					</tr>
					<tr>
						<td class="content-n">单位邮箱：</td>
						<td class="content-d">
							<input type="text" class="form-control" name="company_email" placeholder="单位邮箱" value="<?php echo $data_workdetail['company_email']?>"/>
						</td>
					</tr>
					<tr>
						<td class="addButton" colspan="2">
							<input type="submit" class='save' value ="保存" >
							<input type='button' value='重置'  class='clear' onclick='window.location.reload();'>
						</td>
					</tr>
				</table>
			</form>
		</div>-->
	</div>


	<script type="text/javascript">
		$(document).ready(function() {
			$('#form_id').validationEngine();
		});

//		$("#communication").citySelect({required:false,prov:'<?php echo $data_detail['communication_province'];?>',city:'<?php echo $data_detail['communication_city'];?>',dist:'<?php echo $data_detail['communication_district'];?>'});
//
//		$("#live").citySelect({required:false,prov:'<?php echo $data_detail['live_province'];?>',city:'<?php echo $data_detail['live_city'];?>',dist:'<?php echo $data_detail['live_district'];?>'});
//
//		$("#linkman").citySelect({required:false,prov:'<?php echo $data_links['first_linkman_province'];?>',city:'<?php echo $data_links['first_linkman_city'];?>',dist:'<?php echo $data_links['first_linkman_district'];?>'});
//
//		$("#company").citySelect({required:false,prov:'<?php echo $data_workdetail['company_province'];?>',city:'<?php echo $data_workdetail['company_city'];?>',dist:'<?php echo $data_workdetail['company_district'];?>'});

		$(function() {
//            $('#tt').tabs('select', "详细信息");
//			var tabs = $('#tt').tabs().tabs('tabs');
//			for(var i=0; i<tabs.length; i++) {
//				tabs[i].panel('options').tab.unbind().bind('mouseenter',{index:i},function(e)
//				{
//					$('#tt').tabs('select', e.data.index);
//				});
//			}
		});
	</script>
</body>
</html>